home *** CD-ROM | disk | FTP | other *** search
/ Champak 83 / (Vol 83) My Disc.iso / Games / drying.swf / scripts / frame_132 / PlaceObject2_181_639 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2008-08-08  |  962b  |  49 lines

  1. onClipEvent(enterFrame){
  2.    if(this.state != "ride" && this.state != "hold")
  3.    {
  4.       this._x += (_root._xmouse - this._x) / 2;
  5.       this._y += (_root._ymouse - this._y) / 2;
  6.    }
  7.    if(this._x < _root._xmouse)
  8.    {
  9.       this._xscale = Math.abs(this._xscale);
  10.    }
  11.    else
  12.    {
  13.       this._xscale = - Math.abs(this._xscale);
  14.    }
  15.    if(this._x < 20)
  16.    {
  17.       this._x = 20;
  18.    }
  19.    if(this._x > 354)
  20.    {
  21.       this._x = 354;
  22.    }
  23.    if(this._y < 180)
  24.    {
  25.       this._y = 180;
  26.    }
  27.    if(this._y > 260)
  28.    {
  29.       this._y = 260;
  30.    }
  31.    if(Math.sqrt(this._x - this.bx ^ 2 + (this._y - this.by) ^ 2) < 1)
  32.    {
  33.       if(this.state == "cloth")
  34.       {
  35.          this["mc" + this.state].gotoAndStop("fl" + this.clothnum);
  36.       }
  37.       else
  38.       {
  39.          this["mc" + this.state].gotoAndStop(1);
  40.       }
  41.    }
  42.    else
  43.    {
  44.       this["mc" + this.state].play();
  45.    }
  46.    this.bx = this._x;
  47.    this.by = this._y;
  48. }
  49.